/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package b_and_b_properties.data;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author Omea Morgan
 */
@Entity
@Table(name = "PROPERTY", catalog = "", schema = "SAPCAPSTONE")
@NamedQueries({
    @NamedQuery(name = "Property.findAll", query = "SELECT p FROM Property p"),
    @NamedQuery(name = "Property.findByIdproperty", query = "SELECT p FROM Property p WHERE p.idproperty = :idproperty"),
    @NamedQuery(name = "Property.findByStreetnumber", query = "SELECT p FROM Property p WHERE p.streetnumber = :streetnumber"),
    @NamedQuery(name = "Property.findByStreetdir", query = "SELECT p FROM Property p WHERE p.streetdir = :streetdir"),
    @NamedQuery(name = "Property.findByStreetname", query = "SELECT p FROM Property p WHERE p.streetname = :streetname"),
    @NamedQuery(name = "Property.findByStreetsuffix", query = "SELECT p FROM Property p WHERE p.streetsuffix = :streetsuffix"),
    @NamedQuery(name = "Property.findByCity", query = "SELECT p FROM Property p WHERE p.city = :city"),
    @NamedQuery(name = "Property.findByPstate", query = "SELECT p FROM Property p WHERE p.pstate = :pstate"),
    @NamedQuery(name = "Property.findByZipcode", query = "SELECT p FROM Property p WHERE p.zipcode = :zipcode"),
    @NamedQuery(name = "Property.findByCrossstreet", query = "SELECT p FROM Property p WHERE p.crossstreet = :crossstreet"),
    @NamedQuery(name = "Property.findByCounty", query = "SELECT p FROM Property p WHERE p.county = :county"),
    @NamedQuery(name = "Property.findByTaxid", query = "SELECT p FROM Property p WHERE p.taxid = :taxid"),
    @NamedQuery(name = "Property.findByPtype", query = "SELECT p FROM Property p WHERE p.ptype = :ptype"),
    @NamedQuery(name = "Property.findByPetsallowed", query = "SELECT p FROM Property p WHERE p.petsallowed = :petsallowed"),
    @NamedQuery(name = "Property.findByPetrestrictions", query = "SELECT p FROM Property p WHERE p.petrestrictions = :petrestrictions"),
    @NamedQuery(name = "Property.findByPetdeposit", query = "SELECT p FROM Property p WHERE p.petdeposit = :petdeposit"),
    @NamedQuery(name = "Property.findByPetdepositamount", query = "SELECT p FROM Property p WHERE p.petdepositamount = :petdepositamount"),
    @NamedQuery(name = "Property.findByLotsize", query = "SELECT p FROM Property p WHERE p.lotsize = :lotsize"),
    @NamedQuery(name = "Property.findByYearbuilt", query = "SELECT p FROM Property p WHERE p.yearbuilt = :yearbuilt"),
    @NamedQuery(name = "Property.findBySchooldistrict", query = "SELECT p FROM Property p WHERE p.schooldistrict = :schooldistrict"),
    @NamedQuery(name = "Property.findByOwner", query = "SELECT p FROM Property p WHERE p.owner = :owner"),
    @NamedQuery(name = "Property.findByTownship", query = "SELECT p FROM Property p WHERE p.township = :township"),
    @NamedQuery(name = "Property.findBySubdivision", query = "SELECT p FROM Property p WHERE p.subdivision = :subdivision"),
    @NamedQuery(name = "Property.findByMarketingremarks", query = "SELECT p FROM Property p WHERE p.marketingremarks = :marketingremarks"),
    @NamedQuery(name = "Property.findByAgentremarks", query = "SELECT p FROM Property p WHERE p.agentremarks = :agentremarks"),
    @NamedQuery(name = "Property.findByDirections", query = "SELECT p FROM Property p WHERE p.directions = :directions"),
    @NamedQuery(name = "Property.findByLotlength", query = "SELECT p FROM Property p WHERE p.lotlength = :lotlength"),
    @NamedQuery(name = "Property.findByLotwidth", query = "SELECT p FROM Property p WHERE p.lotwidth = :lotwidth"),
    @NamedQuery(name = "Property.findByZoning", query = "SELECT p FROM Property p WHERE p.zoning = :zoning"),
    @NamedQuery(name = "Property.findBySpecialfinancing", query = "SELECT p FROM Property p WHERE p.specialfinancing = :specialfinancing"),
    @NamedQuery(name = "Property.findByFinancingremarks", query = "SELECT p FROM Property p WHERE p.financingremarks = :financingremarks"),
    @NamedQuery(name = "Property.findByLevels", query = "SELECT p FROM Property p WHERE p.levels = :levels"),
    @NamedQuery(name = "Property.findByFoundation", query = "SELECT p FROM Property p WHERE p.foundation = :foundation"),
    @NamedQuery(name = "Property.findByRoof", query = "SELECT p FROM Property p WHERE p.roof = :roof"),
    @NamedQuery(name = "Property.findByBasement", query = "SELECT p FROM Property p WHERE p.basement = :basement"),
    @NamedQuery(name = "Property.findByFencing", query = "SELECT p FROM Property p WHERE p.fencing = :fencing"),
    @NamedQuery(name = "Property.findByArchitecture", query = "SELECT p FROM Property p WHERE p.architecture = :architecture"),
    @NamedQuery(name = "Property.findByFeatures", query = "SELECT p FROM Property p WHERE p.features = :features"),
    @NamedQuery(name = "Property.findByMisc", query = "SELECT p FROM Property p WHERE p.misc = :misc"),
    @NamedQuery(name = "Property.findByBuildings", query = "SELECT p FROM Property p WHERE p.buildings = :buildings"),
    @NamedQuery(name = "Property.findByAmenities", query = "SELECT p FROM Property p WHERE p.amenities = :amenities"),
    @NamedQuery(name = "Property.findByTrees", query = "SELECT p FROM Property p WHERE p.trees = :trees"),
    @NamedQuery(name = "Property.findByTopography", query = "SELECT p FROM Property p WHERE p.topography = :topography"),
    @NamedQuery(name = "Property.findByDocs", query = "SELECT p FROM Property p WHERE p.docs = :docs"),
    @NamedQuery(name = "Property.findByPview", query = "SELECT p FROM Property p WHERE p.pview = :pview"),
    @NamedQuery(name = "Property.findByOutside", query = "SELECT p FROM Property p WHERE p.outside = :outside"),
    @NamedQuery(name = "Property.findByInside", query = "SELECT p FROM Property p WHERE p.inside = :inside"),
    @NamedQuery(name = "Property.findByPurchaseprice", query = "SELECT p FROM Property p WHERE p.purchaseprice = :purchaseprice"),
    @NamedQuery(name = "Property.findByPurchasedate", query = "SELECT p FROM Property p WHERE p.purchasedate = :purchasedate"),
    @NamedQuery(name = "Property.findByListprice", query = "SELECT p FROM Property p WHERE p.listprice = :listprice"),
    @NamedQuery(name = "Property.findByListdate", query = "SELECT p FROM Property p WHERE p.listdate = :listdate"),
    @NamedQuery(name = "Property.findByShowingremarks", query = "SELECT p FROM Property p WHERE p.showingremarks = :showingremarks"),
    @NamedQuery(name = "Property.findByPicture1", query = "SELECT p FROM Property p WHERE p.picture1 = :picture1"),
    @NamedQuery(name = "Property.findByPicture2", query = "SELECT p FROM Property p WHERE p.picture2 = :picture2"),
    @NamedQuery(name = "Property.findByPicture3", query = "SELECT p FROM Property p WHERE p.picture3 = :picture3"),
    @NamedQuery(name = "Property.findByPicture4", query = "SELECT p FROM Property p WHERE p.picture4 = :picture4"),
    @NamedQuery(name = "Property.findByPicture6", query = "SELECT p FROM Property p WHERE p.picture6 = :picture6"),
    @NamedQuery(name = "Property.findByPicture5", query = "SELECT p FROM Property p WHERE p.picture5 = :picture5")})
public class Property implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "IDPROPERTY")
    private Integer idproperty;
    @Basic(optional = false)
    @Column(name = "STREETNUMBER")
    private int streetnumber;
    @Column(name = "STREETDIR")
    private String streetdir;
    @Basic(optional = false)
    @Column(name = "STREETNAME")
    private String streetname;
    @Column(name = "STREETSUFFIX")
    private String streetsuffix;
    @Basic(optional = false)
    @Column(name = "CITY")
    private String city;
    @Basic(optional = false)
    @Column(name = "PSTATE")
    private String pstate;
    @Basic(optional = false)
    @Column(name = "ZIPCODE")
    private int zipcode;
    @Column(name = "CROSSSTREET")
    private String crossstreet;
    @Column(name = "COUNTY")
    private String county;
    @Column(name = "TAXID")
    private String taxid;
    @Column(name = "PTYPE")
    private String ptype;
    @Column(name = "PETSALLOWED")
    private String petsallowed;
    @Column(name = "PETRESTRICTIONS")
    private String petrestrictions;
    @Column(name = "PETDEPOSIT")
    private Integer petdeposit;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "PETDEPOSITAMOUNT")
    private Double petdepositamount;
    @Column(name = "LOTSIZE")
    private Integer lotsize;
    @Column(name = "YEARBUILT")
    private Integer yearbuilt;
    @Column(name = "SCHOOLDISTRICT")
    private String schooldistrict;
    @Column(name = "OWNER")
    private String owner;
    @Column(name = "TOWNSHIP")
    private String township;
    @Column(name = "SUBDIVISION")
    private String subdivision;
    @Column(name = "MARKETINGREMARKS")
    private String marketingremarks;
    @Column(name = "AGENTREMARKS")
    private String agentremarks;
    @Column(name = "DIRECTIONS")
    private String directions;
    @Column(name = "LOTLENGTH")
    private Integer lotlength;
    @Column(name = "LOTWIDTH")
    private Integer lotwidth;
    @Column(name = "ZONING")
    private String zoning;
    @Column(name = "SPECIALFINANCING")
    private String specialfinancing;
    @Column(name = "FINANCINGREMARKS")
    private String financingremarks;
    @Column(name = "LEVELS")
    private String levels;
    @Column(name = "FOUNDATION")
    private String foundation;
    @Column(name = "ROOF")
    private String roof;
    @Column(name = "BASEMENT")
    private Integer basement;
    @Column(name = "FENCING")
    private Integer fencing;
    @Column(name = "ARCHITECTURE")
    private Integer architecture;
    @Column(name = "FEATURES")
    private Integer features;
    @Column(name = "MISC")
    private Integer misc;
    @Column(name = "BUILDINGS")
    private Integer buildings;
    @Column(name = "AMENITIES")
    private Integer amenities;
    @Column(name = "TREES")
    private Integer trees;
    @Column(name = "TOPOGRAPHY")
    private Integer topography;
    @Column(name = "DOCS")
    private Integer docs;
    @Column(name = "PVIEW")
    private Integer pview;
    @Column(name = "OUTSIDE")
    private Integer outside;
    @Column(name = "INSIDE")
    private Integer inside;
    @Column(name = "PURCHASEPRICE")
    private Double purchaseprice;
    @Column(name = "PURCHASEDATE")
    @Temporal(TemporalType.DATE)
    private Date purchasedate;
    @Column(name = "LISTPRICE")
    private Double listprice;
    @Column(name = "LISTDATE")
    @Temporal(TemporalType.DATE)
    private Date listdate;
    @Column(name = "SHOWINGREMARKS")
    private String showingremarks;
    @Column(name = "PICTURE1")
    private String picture1;
    @Column(name = "PICTURE2")
    private String picture2;
    @Column(name = "PICTURE3")
    private String picture3;
    @Column(name = "PICTURE4")
    private String picture4;
    @Column(name = "PICTURE5")
    private String picture5;
    @Column(name = "PICTURE6")
    private String picture6;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "propertyIdproperty")
//    @Transient
    private List<Unit> unitList = new ArrayList<Unit>();

    public Property() {
    }

    public Property(Integer idproperty) {
        this.idproperty = idproperty;
    }

    public Property(Integer idproperty, int streetnumber, String streetname, String city, String pstate, int zipcode) {
        this.idproperty = idproperty;
        this.streetnumber = streetnumber;
        this.streetname = streetname;
        this.city = city;
        this.pstate = pstate;
        this.zipcode = zipcode;
    }
    
    public Integer getIdproperty() {
        return idproperty;
    }

    public void setIdproperty(Integer idproperty) {
        Integer oldIdproperty = this.idproperty;
        this.idproperty = idproperty;
        changeSupport.firePropertyChange("idproperty", oldIdproperty, idproperty);
    }

    public int getStreetnumber() {
        return streetnumber;
    }

    public void setStreetnumber(int streetnumber) {
        int oldStreetnumber = this.streetnumber;
        this.streetnumber = streetnumber;
        changeSupport.firePropertyChange("streetnumber", oldStreetnumber, streetnumber);
    }

    public String getStreetdir() {
        return streetdir;
    }

    public void setStreetdir(String streetdir) {
        String oldStreetdir = this.streetdir;
        this.streetdir = streetdir;
        changeSupport.firePropertyChange("streetdir", oldStreetdir, streetdir);
    }

    public String getStreetname() {
        return streetname;
    }

    public void setStreetname(String streetname) {
        String oldStreetname = this.streetname;
        this.streetname = streetname;
        changeSupport.firePropertyChange("streetname", oldStreetname, streetname);
    }

    public String getStreetsuffix() {
        return streetsuffix;
    }

    public void setStreetsuffix(String streetsuffix) {
        String oldStreetsuffix = this.streetsuffix;
        this.streetsuffix = streetsuffix;
        changeSupport.firePropertyChange("streetsuffix", oldStreetsuffix, streetsuffix);
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        String oldCity = this.city;
        this.city = city;
        changeSupport.firePropertyChange("city", oldCity, city);
    }

    public String getPstate() {
        return pstate;
    }

    public void setPstate(String pstate) {
        String oldPstate = this.pstate;
        this.pstate = pstate;
        changeSupport.firePropertyChange("pstate", oldPstate, pstate);
    }

    public int getZipcode() {
        return zipcode;
    }

    public void setZipcode(int zipcode) {
        int oldZipcode = this.zipcode;
        this.zipcode = zipcode;
        changeSupport.firePropertyChange("zipcode", oldZipcode, zipcode);
    }

    public String getCrossstreet() {
        return crossstreet;
    }

    public void setCrossstreet(String crossstreet) {
        String oldCrossstreet = this.crossstreet;
        this.crossstreet = crossstreet;
        changeSupport.firePropertyChange("crossstreet", oldCrossstreet, crossstreet);
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        String oldCounty = this.county;
        this.county = county;
        changeSupport.firePropertyChange("county", oldCounty, county);
    }

    public String getTaxid() {
        return taxid;
    }

    public void setTaxid(String taxid) {
        String oldTaxid = this.taxid;
        this.taxid = taxid;
        changeSupport.firePropertyChange("taxid", oldTaxid, taxid);
    }

    public String getPtype() {
        return ptype;
    }

    public void setPtype(String ptype) {
        String oldPtype = this.ptype;
        this.ptype = ptype;
        changeSupport.firePropertyChange("ptype", oldPtype, ptype);
    }

    public String getPetsallowed() {
        return petsallowed;
    }

    public void setPetsallowed(String petsallowed) {
        String oldPetsallowed = this.petsallowed;
        this.petsallowed = petsallowed;
        changeSupport.firePropertyChange("petsallowed", oldPetsallowed, petsallowed);
    }

    public String getPetrestrictions() {
        return petrestrictions;
    }

    public void setPetrestrictions(String petrestrictions) {
        String oldPetrestrictions = this.petrestrictions;
        this.petrestrictions = petrestrictions;
        changeSupport.firePropertyChange("petrestrictions", oldPetrestrictions, petrestrictions);
    }

    public Integer getPetdeposit() {
        return petdeposit;
    }

    public void setPetdeposit(Integer petdeposit) {
        Integer oldPetdeposit = this.petdeposit;
        this.petdeposit = petdeposit;
        changeSupport.firePropertyChange("petdeposit", oldPetdeposit, petdeposit);
    }

    public Double getPetdepositamount() {
        return petdepositamount;
    }

    public void setPetdepositamount(Double petdepositamount) {
        Double oldPetdepositamount = this.petdepositamount;
        this.petdepositamount = petdepositamount;
        changeSupport.firePropertyChange("petdepositamount", oldPetdepositamount, petdepositamount);
    }

    public Integer getLotsize() {
        return lotsize;
    }

    public void setLotsize(Integer lotsize) {
        Integer oldLotsize = this.lotsize;
        this.lotsize = lotsize;
        changeSupport.firePropertyChange("lotsize", oldLotsize, lotsize);
    }

    public Integer getYearbuilt() {
        return yearbuilt;
    }

    public void setYearbuilt(Integer yearbuilt) {
        Integer oldYearbuilt = this.yearbuilt;
        this.yearbuilt = yearbuilt;
        changeSupport.firePropertyChange("yearbuilt", oldYearbuilt, yearbuilt);
    }

    public String getSchooldistrict() {
        return schooldistrict;
    }

    public void setSchooldistrict(String schooldistrict) {
        String oldSchooldistrict = this.schooldistrict;
        this.schooldistrict = schooldistrict;
        changeSupport.firePropertyChange("schooldistrict", oldSchooldistrict, schooldistrict);
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        String oldOwner = this.owner;
        this.owner = owner;
        changeSupport.firePropertyChange("owner", oldOwner, owner);
    }

    public String getTownship() {
        return township;
    }

    public void setTownship(String township) {
        String oldTownship = this.township;
        this.township = township;
        changeSupport.firePropertyChange("township", oldTownship, township);
    }

    public String getSubdivision() {
        return subdivision;
    }

    public void setSubdivision(String subdivision) {
        String oldSubdivision = this.subdivision;
        this.subdivision = subdivision;
        changeSupport.firePropertyChange("subdivision", oldSubdivision, subdivision);
    }

    public String getMarketingremarks() {
        return marketingremarks;
    }

    public void setMarketingremarks(String marketingremarks) {
        String oldMarketingremarks = this.marketingremarks;
        this.marketingremarks = marketingremarks;
        changeSupport.firePropertyChange("marketingremarks", oldMarketingremarks, marketingremarks);
    }

    public String getAgentremarks() {
        return agentremarks;
    }

    public void setAgentremarks(String agentremarks) {
        String oldAgentremarks = this.agentremarks;
        this.agentremarks = agentremarks;
        changeSupport.firePropertyChange("agentremarks", oldAgentremarks, agentremarks);
    }

    public String getDirections() {
        return directions;
    }

    public void setDirections(String directions) {
        String oldDirections = this.directions;
        this.directions = directions;
        changeSupport.firePropertyChange("directions", oldDirections, directions);
    }

    public Integer getLotlength() {
        return lotlength;
    }

    public void setLotlength(Integer lotlength) {
        Integer oldLotlength = this.lotlength;
        this.lotlength = lotlength;
        changeSupport.firePropertyChange("lotlength", oldLotlength, lotlength);
    }

    public Integer getLotwidth() {
        return lotwidth;
    }

    public void setLotwidth(Integer lotwidth) {
        Integer oldLotwidth = this.lotwidth;
        this.lotwidth = lotwidth;
        changeSupport.firePropertyChange("lotwidth", oldLotwidth, lotwidth);
    }

    public String getZoning() {
        return zoning;
    }

    public void setZoning(String zoning) {
        String oldZoning = this.zoning;
        this.zoning = zoning;
        changeSupport.firePropertyChange("zoning", oldZoning, zoning);
    }

    public String getSpecialfinancing() {
        return specialfinancing;
    }

    public void setSpecialfinancing(String specialfinancing) {
        String oldSpecialfinancing = this.specialfinancing;
        this.specialfinancing = specialfinancing;
        changeSupport.firePropertyChange("specialfinancing", oldSpecialfinancing, specialfinancing);
    }

    public String getFinancingremarks() {
        return financingremarks;
    }

    public void setFinancingremarks(String financingremarks) {
        String oldFinancingremarks = this.financingremarks;
        this.financingremarks = financingremarks;
        changeSupport.firePropertyChange("financingremarks", oldFinancingremarks, financingremarks);
    }

    public String getLevels() {
        return levels;
    }

    public void setLevels(String levels) {
        String oldLevels = this.levels;
        this.levels = levels;
        changeSupport.firePropertyChange("levels", oldLevels, levels);
    }

    public String getFoundation() {
        return foundation;
    }

    public void setFoundation(String foundation) {
        String oldFoundation = this.foundation;
        this.foundation = foundation;
        changeSupport.firePropertyChange("foundation", oldFoundation, foundation);
    }

    public String getRoof() {
        return roof;
    }

    public void setRoof(String roof) {
        String oldRoof = this.roof;
        this.roof = roof;
        changeSupport.firePropertyChange("roof", oldRoof, roof);
    }

    public Integer getBasement() {
        return basement;
    }

    public void setBasement(Integer basement) {
        Integer oldBasement = this.basement;
        this.basement = basement;
        changeSupport.firePropertyChange("basement", oldBasement, basement);
    }

    public Integer getFencing() {
        return fencing;
    }

    public void setFencing(Integer fencing) {
        Integer oldFencing = this.fencing;
        this.fencing = fencing;
        changeSupport.firePropertyChange("fencing", oldFencing, fencing);
    }

    public Integer getArchitecture() {
        return architecture;
    }

    public void setArchitecture(Integer architecture) {
        Integer oldArchitecture = this.architecture;
        this.architecture = architecture;
        changeSupport.firePropertyChange("architecture", oldArchitecture, architecture);
    }

    public Integer getFeatures() {
        return features;
    }

    public void setFeatures(Integer features) {
        Integer oldFeatures = this.features;
        this.features = features;
        changeSupport.firePropertyChange("features", oldFeatures, features);
    }

    public Integer getMisc() {
        return misc;
    }

    public void setMisc(Integer misc) {
        Integer oldMisc = this.misc;
        this.misc = misc;
        changeSupport.firePropertyChange("misc", oldMisc, misc);
    }

    public Integer getBuildings() {
        return buildings;
    }

    public void setBuildings(Integer buildings) {
        Integer oldBuildings = this.buildings;
        this.buildings = buildings;
        changeSupport.firePropertyChange("buildings", oldBuildings, buildings);
    }

    public Integer getAmenities() {
        return amenities;
    }

    public void setAmenities(Integer amenities) {
        Integer oldAmenities = this.amenities;
        this.amenities = amenities;
        changeSupport.firePropertyChange("amenities", oldAmenities, amenities);
    }

    public Integer getTrees() {
        return trees;
    }

    public void setTrees(Integer trees) {
        Integer oldTrees = this.trees;
        this.trees = trees;
        changeSupport.firePropertyChange("trees", oldTrees, trees);
    }

    public Integer getTopography() {
        return topography;
    }

    public void setTopography(Integer topography) {
        Integer oldTopography = this.topography;
        this.topography = topography;
        changeSupport.firePropertyChange("topography", oldTopography, topography);
    }

    public Integer getDocs() {
        return docs;
    }

    public void setDocs(Integer docs) {
        Integer oldDocs = this.docs;
        this.docs = docs;
        changeSupport.firePropertyChange("docs", oldDocs, docs);
    }

    public Integer getPview() {
        return pview;
    }

    public void setPview(Integer pview) {
        Integer oldPview = this.pview;
        this.pview = pview;
        changeSupport.firePropertyChange("pview", oldPview, pview);
    }

    public Integer getOutside() {
        return outside;
    }

    public void setOutside(Integer outside) {
        Integer oldOutside = this.outside;
        this.outside = outside;
        changeSupport.firePropertyChange("outside", oldOutside, outside);
    }

    public Integer getInside() {
        return inside;
    }

    public void setInside(Integer inside) {
        Integer oldInside = this.inside;
        this.inside = inside;
        changeSupport.firePropertyChange("inside", oldInside, inside);
    }

    public Double getPurchaseprice() {
        return purchaseprice;
    }

    public void setPurchaseprice(Double purchaseprice) {
        Double oldPurchaseprice = this.purchaseprice;
        this.purchaseprice = purchaseprice;
        changeSupport.firePropertyChange("purchaseprice", oldPurchaseprice, purchaseprice);
    }

    public Date getPurchasedate() {
        return purchasedate;
    }

    public void setPurchasedate(Date purchasedate) {
        Date oldPurchasedate = this.purchasedate;
        this.purchasedate = purchasedate;
        changeSupport.firePropertyChange("purchasedate", oldPurchasedate, purchasedate);
    }

    public Double getListprice() {
        return listprice;
    }

    public void setListprice(Double listprice) {
        Double oldListprice = this.listprice;
        this.listprice = listprice;
        changeSupport.firePropertyChange("listprice", oldListprice, listprice);
    }

    public Date getListdate() {
        return listdate;
    }

    public void setListdate(Date listdate) {
        Date oldListdate = this.listdate;
        this.listdate = listdate;
        changeSupport.firePropertyChange("listdate", oldListdate, listdate);
    }

    public String getShowingremarks() {
        return showingremarks;
    }

    public void setShowingremarks(String showingremarks) {
        String oldShowingremarks = this.showingremarks;
        this.showingremarks = showingremarks;
        changeSupport.firePropertyChange("showingremarks", oldShowingremarks, showingremarks);
    }

    public String getPicture1() {
        return picture1;
    }

    public void setPicture1(String picture1) {
        String oldPicture1 = this.picture1;
        this.picture1 = picture1;
        changeSupport.firePropertyChange("picture1", oldPicture1, picture1);
    }

    public String getPicture2() {
        return picture2;
    }

    public void setPicture2(String picture2) {
        String oldPicture2 = this.picture2;
        this.picture2 = picture2;
        changeSupport.firePropertyChange("picture2", oldPicture2, picture2);
    }

    public String getPicture3() {
        return picture3;
    }

    public void setPicture3(String picture3) {
        String oldPicture3 = this.picture3;
        this.picture3 = picture3;
        changeSupport.firePropertyChange("picture3", oldPicture3, picture3);
    }

    public String getPicture4() {
        return picture4;
    }

    public void setPicture4(String picture4) {
        String oldPicture4 = this.picture4;
        this.picture4 = picture4;
        changeSupport.firePropertyChange("picture4", oldPicture4, picture4);
    }

    public String getPicture5() {
        return picture5;
    }

    public void setPicture5(String picture5) {
        String oldPicture5 = this.picture5;
        this.picture5 = picture5;
        changeSupport.firePropertyChange("picture5", oldPicture5, picture5);
    }
    public String getPicture6() {
        return picture6;
    }

    public void setPicture6(String picture6) {
        String oldPicture6 = this.picture6;
        this.picture6 = picture6;
        changeSupport.firePropertyChange("picture6", oldPicture6, picture6);
    }
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idproperty != null ? idproperty.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Property)) {
            return false;
        }
        Property other = (Property) object;
        if ((this.idproperty == null && other.idproperty != null) || (this.idproperty != null && !this.idproperty.equals(other.idproperty))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "b_and_b_properties.data.Property[ idproperty=" + idproperty + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }

    public void setShowinginstructions(String text) {
        // TODO showing instructions
//        throw new UnsupportedOperationException("Not yet implemented");
    }

    public List<Unit> getUnitListAsList() {
        return unitList;
    }

    public void setUnitList(List<Unit> unitList) {
        this.unitList = unitList;
    }

    public Unit[] getUnitListAsUnits() {
        return (Unit[]) this.unitList.toArray();
    }

    public void setUnitList(Unit[] unitList) {
        newUnitArray();
        for (Unit u : unitList) {
            this.unitList.add(u);
        }
    }

    public void newUnitArray() {
        this.unitList = new ArrayList<Unit>();
    }
    
    public void newUnitArray(int size) {
        this.unitList = new ArrayList<Unit>(size);
        for (int i = 0; i < size; i++) {
            this.unitList.add(i, new Unit());
        }
    }
    
    public Unit getUnit(int unitNum) {
        return unitList.get(unitNum);
    }
    
    public void setUnit(int index, Unit unit) {
        unitList.set(index, unit);
    }
    
    public int getUnitArrayLength() {
        return unitList.size();
    }
    
    public void addUnit(Unit unit) {
        unitList.add(unit);
    }
    
}
